package com.info.zhiduoduo.repository.mapper.crowdsource;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.info.zhiduoduo.repository.entity.crowdsource.CrowdsourcePayConfig;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @author tianyonghong
 * @create 2023/2/12
 */
public interface CrowdsourcePayConfigMapper extends BaseMapper<CrowdsourcePayConfig> {

    @Select(" select * from zdd_crowdsource_pay_config " +
            " where register_city_id = #{registerCityId} " +
            " and pay_id = #{payId} limit 1")
    CrowdsourcePayConfig selectOneByCityAndPayType(Integer registerCityId,Integer payId);

    //根据支付方式查询可以通过的注册地
    @Select(" select register_city_id from zdd_crowdsource_pay_config " +
            " where pay_id = #{payId} " +
            " and is_crowdsource = 1 ")
    List<Integer> selectCitysByPayType(Integer payId);
}
